Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pg_stat_replication compatibility on older pg versions #103

Merged
merged 1 commit into from
Feb 23, 2025

Conversation

rjuju
Copy link
Member

@rjuju rjuju commented Feb 22, 2025

  • the view exists in all postgres versions supported by powa
  • the "reply_time" column was added in pg12
  • a bunch of column renamed and added in pg10

@rjuju rjuju self-assigned this Feb 22, 2025
@rjuju rjuju force-pushed the fix_pg_stat_replication branch from 6c543d4 to 2d879f9 Compare February 22, 2025 11:08
@rjuju
Copy link
Member Author

rjuju commented Feb 22, 2025

I forgot why I initially restricted pg_stat_replicatino on pg13+: it's because this version added the various aggregate functions for the pg_lsn datatype. I added a comment so I don't forget again, and since I wrote the compatibility code I will just keep in in case we ever want to add those casts ourselves, or add some other workaround. It's also convenient to be able to just blindly call the src function to quickly check that it's working.

- the view exists in all postgres versions supported by powa
- the "reply_time" column was added in pg12
- a bunch of column renamed and added in pg10
@rjuju rjuju force-pushed the fix_pg_stat_replication branch from 2d879f9 to cb15165 Compare February 22, 2025 23:54
@rjuju rjuju merged commit ab1b163 into master Feb 23, 2025
9 checks passed
@rjuju rjuju deleted the fix_pg_stat_replication branch February 23, 2025 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant